<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登陆页面</title>
    <style>
        .bjt {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            min-width: 1000px;
            z-index: -10;
            zoom: 1;
            background-color: #fff;
            background-repeat: no-repeat;
            background-size: cover;
            -webkit-background-size: cover;
            -o-background-size: cover;
            background-position: center 0;
        }
        
        h1 {
            margin: 0px 150px;
            font-size: 40px;
            color: #16d6a8;
        }
        
        .box {
            position: relative;
            width: 400px;
            margin: 100px auto;
        }
        
        .box img {
            position: absolute;
            width: 20px;
            top: 215px;
            right: 5px;
        }
        
        .box input {
            margin: 40px auto;
            width: 396px;
            height: 30px;
            border: none;
            border-bottom: 1px solid #16d6a8;
            outline: none;
            background-color: transparent;
            color: #16d6a8;
        }
        
        input::placeholder {
            color: #16d6a8;
        }
        
        #eye {
            display: none;
        }
        
        a {
            position: absolute;
            top: 291px;
            right: 70px;
            color: #ccc;
            text-decoration: none;
        }
        
        button {
            position: absolute;
            width: 100px;
            height: 30px;
            color: #fff;
            background-color: #16d6a8;
            top: 280px;
            left: 160px;
            border: none;
            border-radius: 15px 15px 15px 15px;
            text-align: center;
            font-size: 20px;
            cursor: pointer;
            outline: none;
        }
        
        button:hover {
            color: #16d6a8;
            background-color: transparent;
            border: 2px solid #16d6a8;
        }
    </style>
</head>

<body>
    <div class="bjt" style="background-image: url(img/bgp.png);">
        <div class="box">
            <h1>登 录</h1>

            <input type="text" name="" id="usern" placeholder="请输入用户名/邮箱/手机号">
            <label for="psd">
                <img src="img/close.png" alt="" id="eye">
            </label>
            <input type="password" name="" id="pwd" placeholder="请输入密码" inputmode="numeric" minlength="4" maxlength="8" size="8">
            <button type="submit" id="btn">登 录</button>
            <a href="#">忘记密码</a>

        </div>
    </div>

    <script>
        var eye = document.getElementById('eye')
        var pwd = document.getElementById('pwd')
        var btn = document.getElementById('btn')
        var flag = 0
        eye.onclick = function() {
            if (flag == 0) {
                pwd.type = 'text'
                eye.src = 'img/open.png'
                btn.style.backgroundColor = "#ccc"
                flag = 1
            } else {
                pwd.type = 'password'
                eye.src = 'img/close.png'
                btn.style.backgroundColor = "#16d6a8"
                flag = 0
            }
        }
    </script>
</body>

</html>